import type { Router, RouteRecordRaw } from 'vue-router'

import { asyncRoutes } from '@/router/routes'

export function createPermissionGuard(router: Router) {
    // router.beforeEach(async (to, from, next) => {
    //     asyncRoutes.forEach(route => {
    //         router.addRoute(route as unknown as RouteRecordRaw)
    //     })
    //     next()
    //     return
    // })
}
